<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$user = Blyn::app()->getCurrentUser();
$userInfo = $user->getAttribute('userInfo');
$isAuthenticateHamshun = 'no';
$attributes = array();
if ($userInfo) {
    $attributes = $userInfo->getChildren();
        foreach ($attributes as $attr) {
            if($attr->getName() == 'isAuthenticateHamshun'){
                $isAuthenticateHamshun = $attr->getValue();  
            }
     }
}
if($isAuthenticateHamshun == 'yes'){
    $control->renderView('displayUserInfo_hamshun');
}  else {
    $control->renderView('displayAuthenticateHamshun');
} 